package com.estun.backroundManagementService.modules.product.model.res;

import com.estun.backroundManagementService.modules.product.model.Product;
import lombok.Data;

/**
 * @author yusiocng
 * @date 2024/1/4
 * @description 产品上、下油路板数据
 */
@Data
public class ProductRecord {

    private Product up;

    private Product lower;

    private Product test;

    public void putProduct(Product product) {
        if (product != null && product.getType() != null) {
            Integer type = product.getType();
            switch (type) {
                case 1: {
                    setUp(product);
                    break;
                }
                case 2: {
                    setLower(product);
                    break;
                }
                case 3: {
                    setTest(product);
                    break;
                }
            }
        }
    }
}
